<script setup lang="ts">
 import { ref,inject } from 'vue'

// const count = ref(0)
// const props = defineProps(['title','addClick'])//父传子
// console.log(props.title)
//defineEmits(['childClick'])
//defineProps(["xd"]);
//defineEmits(["updateValue"]);
// const xd = defineModel('xd');
// const ab = defineModel('ab');
//const { xd , addClick } = inject("xd");

</script>

<template>
  <h1>子组件3</h1>
  
  <!-- <span @click="addClick">{{ xd }}</span> -->
 <!--  <input type="text" v-model="xd"/>
  <input type="text" v-model="ab"/> -->
  <!-- <input type="text" :value="xd" @input="$emit('updateValue',$event.target.value)"> -->
  <!-- <div class="blog-post">
    <h4>子页面获取到得值：{{ title }}</h4>
    <button @click="$emit('enlarge-text')">Enlarge text</button>
    <button @click="$emit('reduce-text')">Reduce text</button>
    <button @click="addClick">子组件按牛</button>
  </div>
  <n/> -->
  <!-- <h1>子传父方法：</h1>
  <button @click="$emit('childClick','canshu')">子组件按扭</button> -->
</template>